package it.uniroma2.art.coda.projectionrule.graph;

import it.uniroma2.art.coda.projectionrule.ProjectionRule;

/**
 * This abstract class is the generic single element of a triple
 * 
 * @author Andrea Turbati
 * 
 */
public abstract class GraphSingleElement {
	private boolean issue;
	private ProjectionRule prRule;

	/**
	 * 
	 * @param prRule
	 *            the projection Rule this element belongs to
	 */
	public GraphSingleElement(ProjectionRule prRule) {
		this.prRule = prRule;
		issue = false;
	}

	/**
	 * Check if this element has any issue
	 * 
	 * @return true if this element has any issue, false otherwise
	 */
	public boolean hasIssue() {
		return issue;
	}

	/**
	 * Set true if there is any issue with this element, false otherwise
	 * 
	 * @param issue
	 *            true if this element has any issue, false otherwise
	 */
	public void setIssue(boolean issue) {
		this.issue = issue;
	}

	/**
	 * Get the projection rule
	 * 
	 * @return the projection rule this element belongs to
	 */
	public ProjectionRule getPRRule() {
		return prRule;
	}
}
